package com.wing.warehouse.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.enums.IEnum;
import com.wing.mybatis.common.BaseEntity;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 仓库类型
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("warehouse_factory_administration_type")
public class WarehouseFactoryTypeEntity extends BaseEntity<WarehouseFactoryTypeEntity> implements Serializable {

    private static final long serialVersionUID = 1L;

    public enum Status implements IEnum<Integer> {

        /**
        * 停用
        */
        unable(0,"停用"),
        /**
        * 启用
        */
        enable(1,"启用");

        private int code;
        private String desc;

        Status(int code,String desc){
            this.code=code;
            this.desc=desc;
        }

        @Override
        public Integer getValue(){
            return this.code;
        }

        public String getDesc(){
            return this.desc;
        }
    }

    /**
     * 创建人
     */
    private Long creator;

    /**
     * 修改人
     */
    private Long modifier;

    /**
     * 名称
     */
    private String name;

    /**
     * 编码
     */
    private String code;

    /**
     * 状态
     */
    private Status status;

    /**
    * 状态描述
    */
    @TableField(exist = false)
    private String statusDesc;

    public String getStatusDesc() {
        return status == null ? null : status.getDesc();
    }

    /**
     * 序号
     */
    private Integer sortNumber;

    /**
     * 备注描述
     */
    private String description;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * 创建人
     */
    private String creatorName;

    /**
     * 系统仓库分类标记id
     */
    private Long warehouseSystemCategoryId;

    /**
     * 是否料箱仓库
     */
    private Boolean hasBoxWarehouse;

}
